$(function () {
    imgSrcToggle();
    $('#canvas').height($('#carousel-example-generic').height());
})

//此函数实现的功能为经过图片更改图片的src属性
function imgSrcToggle() {
    // $(".xiutu_box_content img").attr("src", "img/PsBrush.png");
    var imgArray = ["img/CameraRaw.png","img/Photoshop.png","img/Lightroom.png","img/RAW.png","img/PsBrush.png"];
    var imgArrayNew = ["img/PsBrush.png","img/CameraRaw.png","img/Photoshop.png","img/Lightroom.png","img/RAW.png"];
    var imgElements = $(".xiutu_box_content img");
    for (let i = 0; i < imgArray.length; i++) {
        imgElements.eq(i).attr("src", imgArray[i]);
        
    }
    imgElements.hover(function () {
        // over
        //得到当前鼠标经过的图片的序号
        var i = imgElements.index(this);
        imgElements.eq(i).attr("src", imgArrayNew[i]);
    }, function () {
        // out
        var i = imgElements.index(this);
        imgElements.eq(i).attr("src", imgArray[i]);
    }
    );
}